package com.itfs.enums;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

//实现接口

@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum ColorEnums  implements Behaviour{

    RED("red","红色"),
    GREEN("green","绿色"),
    BLANK("blank","白色"),
    YELLOW("yellow","黄色");

    //成员变量
    private String name;
    private String value;

    //接口中的方法
    @Override
    public void print() {
        System.out.println(this.name + ":" + this.value);
    }

    @Override
    public String getInfo() {
        return this.name;
    }
}
